﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="ComponentEvaluate.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.ComponentEvaluate" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script language="javascript" type="text/javascript">


    </script>
</telerik:RadCodeBlock>


<telerik:RadSkinManager ID="QsfSkinManager" runat="server"/>
<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="False" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="cboRound">
            <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cboRound" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeList1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="btnApproved" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>

        <telerik:AjaxSetting AjaxControlID="RadTreeList1">
            <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeList1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<div style="background-color:#7DA5E0; color: #FFFFFF; font-weight: bold; font-family: 'Segoe UI'; font-size: 13px; padding: 5px;">
    <table width="100%">
        <tr>
            <td  align="left" valign="top" width="200px" colspan="2" >
                    การประเมินโดย : <asp:Label runat="server" ID="lblNamePos"></asp:Label>
            </td>
             <td  align="left" colspan="2" style="text-align:right;" width="20px" >
                    รอบการประเมิน :  
            </td>
            <td  align="left" colspan="2" >
                <telerik:RadComboBox ID="cboRound" runat="server" Filter="Contains" 
                    DataValueField="evaluation_round_seq" DataTextField="evaluation_round"  AutoPostBack="True"
                    onselectedindexchanged="cboRound_SelectedIndexChanged">
                </telerik:RadComboBox>
            </td>
        </tr>
    </table> 
</div>   

<div class="Background980V2" style="margin-top: 5px; min-height: 500px">  
     <telerik:RadTreeList ID="RadTreeList1" runat="server" 
         AutoGenerateColumns="False" ParentDataKeyNames="pos_working_upper_seq"  
        DataKeyNames="pos_seq" ClientDataKeyNames="pos_seq" AllowSorting="True" 
         AllowMultiItemSelection="True" onitemdatabound="RadTreeList1_ItemDataBound">
        
        <ExportSettings ExportMode="RemoveControls">
            <Excel PageLeftMargin="0.7in" PageRightMargin="0.7in"></Excel>
            <Pdf PageWidth="8.5in" PageHeight="11in"></Pdf>
        </ExportSettings>

        <EditFormSettings EditFormType="AutoGenerated">
            <EditColumn MinWidth="" MaxWidth=""></EditColumn>
        </EditFormSettings>

           <Columns>

                <telerik:TreeListBoundColumn DataField="emp_seq" UniqueName="emp_seq" HeaderText="emp_seq" Visible="false" 
                    HeaderStyle-Width="150px">
                    <HeaderStyle Width="150px"></HeaderStyle>
               </telerik:TreeListBoundColumn>

               <telerik:TreeListBoundColumn DataField="user_seq" UniqueName="user_seq" HeaderText="user_seq" Visible="false" 
                    HeaderStyle-Width="150px">
                    <HeaderStyle Width="150px"></HeaderStyle>
               </telerik:TreeListBoundColumn>

               <telerik:TreeListBoundColumn DataField="round_seq" UniqueName="round_seq" HeaderText="round_seq" Visible="false" 
                    HeaderStyle-Width="150px">
                    <HeaderStyle Width="150px"></HeaderStyle>
               </telerik:TreeListBoundColumn>
              

                  <telerik:TreeListTemplateColumn HeaderText="ชื่อ-สกุล" ReadOnly="True" Resizable="False" Reorderable="False" 
               AllowSorting="False" UniqueName="emp_name">
                   <ItemTemplate>
                       <asp:HyperLink ID="hplEmpName" runat="server"><%# Eval("emp_name")%></asp:HyperLink>
                  </ItemTemplate>  
                   <HeaderStyle HorizontalAlign="Center" Width="120px"></HeaderStyle>
                   <ItemStyle HorizontalAlign="Center"></ItemStyle>             
               </telerik:TreeListTemplateColumn>

               <telerik:TreeListBoundColumn DataField="pos_name" UniqueName="pos_name" HeaderText="ตำแหน่ง" 
                    HeaderStyle-Width="150px">
                    <HeaderStyle Width="150px"></HeaderStyle>
               </telerik:TreeListBoundColumn>

               <telerik:TreeListBoundColumn  DataField="job_site_name" UniqueName="job_site_name" 
                    HeaderText="สังกัดหน่วยงาน" HeaderStyle-Width="150px">
                    <HeaderStyle Width="150px"></HeaderStyle>
               </telerik:TreeListBoundColumn>

               <telerik:TreeListTemplateColumn HeaderText="บุคลากรประเมิน" ReadOnly="True" Resizable="False" Reorderable="False" 
               AllowSorting="False" UniqueName="isevaluated">
                   <ItemTemplate>
                       <asp:CheckBox ID="chkIsevaluate" runat="server" Checked='<%# Convert.ToInt32(Eval("isevaluated")) == 1 %>' onClick="javascript: return false;" />
                   </ItemTemplate>  
                   <HeaderStyle HorizontalAlign="Center" Width="60px"></HeaderStyle>
                   <ItemStyle HorizontalAlign="Center"></ItemStyle>             
               </telerik:TreeListTemplateColumn>

               <telerik:TreeListTemplateColumn HeaderText="หัวหน้าสำนักอนุมัติ" Resizable="False" Reorderable="False" AllowSorting="False">
                   <ItemTemplate>
                       <asp:CheckBox ID="chkIsapprove" runat="server" Enabled="false"
                        Checked='<%# Convert.ToInt32(Eval("isapproved")) == 1 %>'  /><%--onClick="javascript: return false;"--%>
                   </ItemTemplate>  
                   <HeaderStyle HorizontalAlign="Center" Width="60px"></HeaderStyle>
                   <ItemStyle HorizontalAlign="Center"></ItemStyle>             
               </telerik:TreeListTemplateColumn>
          </Columns>

     </telerik:RadTreeList>
     <br />
     <center><asp:Button ID="btnApproved" runat="server" Text="อนุมัติ" Width="100px"
             onclick="btnApproved_Click" OnClientClick="return confirm('คุณต้องการอนุมัติใช่หรือไม่');" /></center>
</div>
</asp:Content>

